﻿using System;
using System.IO;

namespace DevelopersTestPad.Remoting
{
    /// <summary>
    /// The parameters for the Developer's Test Pad script.
    /// </summary>
    [Serializable]
    public sealed class DevelopersTestPadParameters : MarshalByRefObject
    {
        /// <summary>
        /// Occurs when received an interaction message.
        /// </summary>
        public event EventHandler<InteractionMessageEventArgs> ReceiveInteractionMessage;

        /// <summary>
        /// Raises the <see cref="ReceiveInteractionMessage"/> event.
        /// </summary>
        /// <param name="e">An <see cref="InteractionMessageEventArgs"/> that contains the event data.</param>
        internal void OnReceiveInteractionMessage(InteractionMessageEventArgs e)
        {
            EventHandler<InteractionMessageEventArgs> handler = ReceiveInteractionMessage;
            if (handler != null)
            {
                handler(this, e);
            }
        }

        /// <summary>
        /// The console standard output stream.
        /// </summary>
        public TextWriter ConsoleStandardOutputStream { set; get; }

        /// <summary>
        /// The console standard input stream.
        /// </summary>
        public TextReader ConsoleStanrardInputStream { set; get; }

    }
}
